<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title>佐心，教家长做父母</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="format-detection" content="telephone=no">
	<c:set var="ctx" value="${pageContext.request.contextPath}" />
    <link rel="stylesheet" href="assets/css/amazeui.min.css?v=2.9">
    <link rel="stylesheet" href="assets/css/style.css?v=2.3">
    <link rel="stylesheet" href="assets/css/index.css?v=2.3">
    <script src="assets/js/mymyAlert.js"></script>
    <script>
    var linkJpg="http://m.zuoxinjiazhang.com/js/zuoxin.jpg";
var title="佐心，教家长做智慧父母。佐心家长平台提供心理咨询，免费提问，培训集训，心理评估，欢迎关注佐心科技微信公众号";
var content="佐心，教家长做智慧父母。佐心家长平台提供心理咨询，免费提问，培训集训，心理评估，欢迎关注佐心科技微信公众号";
    var signUrl2=location.href.split('#')[0];
	if(signUrl2.indexOf("isappinstalled")>0){
		signUrl2=signUrl2.split('?')[0];
		location.href="index.jsp";
	}
    </script>
    <script>
    	function freeAsk(){
    		location.href="goZuoXinPage?sdayuuuh=123&goPage=/freeAsk";
    	}
    </script>
</head>
<body class="bg-gray">
<header data-am-widget="header" class="am-header am-header-default am-header-fixed">
    <div class="am-header-left am-header-nav width-40" >
        <a class="am-header-icon-customs prelative" >
           <div class="padding-left-40"><i class="logo_home"></i>佐心家长</div>
        </a>
    </div>
    <h1 class="am-header-title home-h1" >
    </h1>
    <div class="am-header-right am-header-nav" onclick="$('#my-popup').modal('open')">

        <a class="am-text-right">
            <img class="am-header-icon-custom-img" src="assets/images/icon/index/icon_03.png"
                 alt=""/><span class="am-margin-left-xs " id="span_city"></span>
        </a>

    </div>
</header>
<section class="" id="amz-main" data-tag="css-nav">
    <!--banner开始-->
    <div data-am-widget="slider" class="am-slider am-slider-default" data-am-slider='{}'>
        <ul class="am-slides">
            <li>
               <a id="srch1" href="javascript:void(0);"><img id="src1" src="assets/images/upload/banner.png" style="height:164px;"></a>
            </li>
            <li>
               <a id="srch2" href="javascript:void(0);"> <img id="src2" src="assets/images/upload/banner.png" style="height:164px;"></a>
            </li>
            <li>
               <a id="srch3" href="javascript:void(0);"> <img id="src3" src="assets/images/upload/banner.png" style="height:164px;"></a>
            </li>
            <li>
               <a id="srch4" href="javascript:void(0);"> <img id="src4" src="assets/images/upload/banner.png" style="height:164px;"></a>
            </li>
            <li>
                <a id="srch5" href="javascript:void(0);"><img id="src5" src="assets/images/upload/banner.png" style="height:164px;"></a>
            </li>
            <li>
               <a id="srch6" href="javascript:void(0);"> <img id="src6" src="assets/images/upload/banner.png" style="height:164px;"></a>
            </li>
        </ul>
    </div>

     <!--八大菜单开始-->
    <div class="am-container am-home-men font-14 bg-white font-color-main padding-bottom-15px">
        <div class="am-g am-g-fixed am-margin-top-sm">
            <div class="am-u-sm-3 am-text-center " onclick="window.location.href='quesfenlei.jsp?flag=1'"><img
                    class="am-thumbnail margin-auto" src="assets/images/icon/index/icon_09.png"/>学业倦怠
            </div>
            <div class="am-u-sm-3 am-text-center " onclick="window.location.href='quesfenlei.jsp?flag=2'"><img
                    class="am-thumbnail margin-auto" src="assets/images/icon/index/icon_11.png"/>亲子关系
            </div>
            <div class="am-u-sm-3 am-text-center " onclick="window.location.href='quesfenlei.jsp?flag=3'"><img
                    class="am-thumbnail margin-auto" src="assets/images/icon/index/icon_13.png"/>教育理念
            </div>
            <div class="am-u-sm-3 am-text-center " onclick="window.location.href='quesfenlei.jsp?flag=4'"><img
                    class="am-thumbnail margin-auto" src="assets/images/icon/index/icon_15.png"/>学习习惯
            </div>
        </div>
        <div class="am-g am-g-fixed am-margin-top-sm">
            <div class="am-u-sm-3 am-text-center " onclick="window.location.href='quesfenlei.jsp?flag=5'"><img
                    class="am-thumbnail margin-auto" src="assets/images/icon/index/icon_21.png"/>人际关系
            </div>
            <div class="am-u-sm-3 am-text-center " onclick="window.location.href='quesfenlei.jsp?flag=6'"><img
                    class="am-thumbnail margin-auto" src="assets/images/icon/index/icon_22.png"/>沉迷网络
            </div>
            <div class="am-u-sm-3 am-text-center " onclick="window.location.href='quesfenlei.jsp?flag=7'"><img
                    class="am-thumbnail margin-auto" src="assets/images/icon/index/icon_23.png"/>情绪管理
            </div>
            <div class="am-u-sm-3 am-text-center " onclick="window.location.href='quesfenlei.jsp?flag=8'"><img
                    class="am-thumbnail margin-auto" src="assets/images/icon/index/icon_24.png"/>自控能力
            </div>
        </div>
    </div>

    <div class="am-padding-left-sm am-padding-right-sm bg-white">
        <div class="border-tops"></div>
    </div>
    <div class="am-g am-g-fixed bg-white   am-padding-top-sm am-padding-bottom-sm">
        <div class="am-u-sm-6 border-right anser-div am-padding-right-0">
            <div class="anser-pic-div"><img src="assets/images/icon/index/icon_30.png" class="img-40"></div>
            <div class="font-color-main" onclick="freeAsk()">免费提问</div>
            <div class="font-12 font-color-11">专业团队在线解答</div>
        </div>
        <div class="am-u-sm-6 anser-div am-padding-right-0">
            <div class="anser-pic-div"><img src="assets/images/icon/index/icon_33.png" class="img-40"></div>
            <div class="font-color-main" onclick="window.location.href='book.jsp'">快速预约</div>
            <div class="font-12 font-color-11">专家实时在线解答</div>
        </div>
    </div>


    <!--列表开始-->
    <div class="  bg-white am-margin-top-sm am-padding-top-xs am-padding-bottom-xs">
        <div data-am-widget="titlebar" class="am-titlebar am-titlebar-default prelative">
            <i class="icon_38"></i>
            <h2 class="am-titlebar-title "><span class="font-16 font-bold">家长成熟度</span><span
                    class="am-margin-left-xs font-12 font-color-11">测试你现在的状态哦</span></h2>
            <i class="btn-1" onclick="window.location.href='gotoPinggu?flag=9'">测试</i>
        </div>
    </div>
    <div class="am-list-news am-list-news-default ">

        <div class="am-list-news-bd">
            <ul class="am-list">
            </ul>
        </div>
    </div>
    <!--列表结束-->
<div class="font-14 am-text-center am-padding-top-xs font-color-12">
    <span onclick="moreCounselor();" id="seeMore">查看更多</span>
</div>
</section>
<footer data-am-widget="navbar" class="am-navbar am-cf am-navbar-default "
        id="">
    <ul class="am-navbar-nav am-cf am-avg-sm-4">
        <li>
            <a href="index.jsp" class="selected">
                <img src="assets/images/icon/index/icon_home_on.png"
                     alt="首页"/>
                <span class="am-navbar-label">首页</span>
            </a>
        </li>
        <li>
            <a href="counseKu.jsp" class="">
                <img src="assets/images/icon/index/icon_zhuanjia.png"
                     alt="专家库"/>
                <span class="am-navbar-label">专家库</span>
            </a>
        </li>

        <li>
            <a href="peixun.jsp" class="">
                <img src="assets/images/icon/index/icon_peixun.png"
                     alt="培训"/>
                <span class="am-navbar-label">培训</span>
            </a>
        </li>
        <li>
            <a href="myzones.jsp" class="">
                <img src="assets/images/icon/index/icon_user.png"
                     alt="我的"/>
                <span class="am-navbar-label" onclick="goMe();">我的</span>
            </a>
        </li>
    </ul>
</footer>


<!--选择城市-->
<div class="am-popup" id="my-popup">
    <div class="am-popup-inner">

        <header data-am-widget="header" class="am-header am-header-default am-header-fixed ">
            <div class="am-header-left am-header-nav">
                <a class="" data-am-modal-close>
                    <!--更新-->
                    <i class="icon_8"></i>
                </a>
            </div>
            <h1 class="am-header-title">
                选择城市
            </h1>

        </header>

        <section class="" data-tag="css-nav">
            <div class="filter-container">
                <ul class="list-group">
                    <li class="fis-filter-item letter"><a>当前</a> <i></i></li>
                    <li class="fis-filter-item "><a id="cityName">${$cityName}</a><span class="font-gray-1 font-14">（GPS定位）</span> <i></i></li>
                    <li class="fis-filter-item letter"><a>选择其他城市</a> <i></i></li>
                </ul>
                <ul class="list-group" id="cityList" data-node="city">
                    <li class="fis-filter-item selected" data-am-modal-close><a>苏州市</a> <i></i></li>
                    <li class="fis-filter-item " data-am-modal-close><a>福州市</a> <i></i></li>
                    <li class="fis-filter-item " data-am-modal-close><a>上海市</a> <i></i></li>
                    <li class="fis-filter-item " data-am-modal-close><a>深圳市</a> <i></i></li>
                </ul>


            </div>


        </section>
    </div>
</div>

<script src="assets/js/jquery.min.js"></script>
<script src="assets/js/amazeui.min.js"></script>

<script src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>   
<script>  
var nonceStr;
	var timestamp;
	var signature;
	var appId;
	var signUrl=location.href.split('#')[0];
	htmlobj=$.ajax({url:"getSign?url="+signUrl,async:false});
	var json=JSON.parse(htmlobj.responseText);
	signature=json.signature; 
	nonceStr=json.nonceStr; 
	timestamp=json.timestamp; 
	appId=json.appId; 
	wx.config({    
	debug: false,    
	appId: appId,    
	timestamp: timestamp,    
	nonceStr: nonceStr,    
	signature: signature,    
jsApiList: [        
'checkJsApi',    
'onMenuShareTimeline',    
'onMenuShareAppMessage',    
'onMenuShareQQ',    
'onMenuShareWeibo',    
'hideMenuItems',    
'showMenuItems',    
'hideAllNonBaseMenuItem',    
'showAllNonBaseMenuItem',    
'translateVoice',    
'startRecord',    
'stopRecord',    
'onRecordEnd',    
'playVoice',    
'pauseVoice',    
'stopVoice',    
'uploadVoice',    
'downloadVoice',    
'chooseImage',    
'previewImage',    
'uploadImage',    
'downloadImage',    
'getNetworkType',    
'openLocation',    
'getLocation',    
'hideOptionMenu',    
'showOptionMenu',    
'closeWindow',    
'scanQRCode',    
'chooseWXPay',    
'openProductSpecificView',    
'addCard',    
'chooseCard',    
'openCard'
]       
	}); 
if(""=='${cityName}'){
	wx.ready(function () {
		wx.getLocation({
		  success: function (res){
		        var json=JSON.stringify(res);
		        json=JSON.parse(json);
		        var latitude=json.latitude;
		        var longitude=json.longitude;
		        var cityName=$.ajax({url:"getCityName?la="+latitude+"&lo="+longitude,async:false});
		    	var cityName1=JSON.parse(cityName.responseText);
		    	$("#span_city").text(cityName1.cityName.substr(0,2));
		    	$("#cityName").text(cityName1.cityName.substr(0,2));
	      },
	      cancel: function (res) {
	        myAlert('用户拒绝授权获取地理位置');
	      }
	    }); 
	});
}else{
	$("#span_city").text('${cityName}'.substr(0,2));
	$("#cityName").text('${cityName}'.substr(0,2));
}
</script>
<script>
	function goCounselor(tel){
        location.href="gotoCounselorDescjsp?tel="+tel;
    };

    $(function () {
    
        var cityLists=$.ajax({url:"getCityList",async:false});
        var cityList=JSON.parse(cityLists.responseText);
        if(cityList.resultCode=="0"){
        	var cityListHtml="";
        	   for(var i=0;i<cityList.cityNameList.length;i++){
	               cityListHtml+="<li class='fis-filter-item ' data-am-modal-close><a>"+cityList.cityNameList[i].cityName+"市</a> <i></i></li>";
               };
               $("#cityList").html(cityListHtml);
        }
        
        // 城市选择
        $("[data-node='city']").find(" li").click(function () {
            $("[data-node='city']").find(" li").removeClass("selected");
            $(this).addClass("selected");
            $("#span_city").text($(this).text().substring(0, 2));
            $("#cityName").text($(this).text().substring(0, 2));
        });
       
         var jsonAdvert=$.ajax({url:"getAdvertPic?type=1",async:false});
        var advert=JSON.parse(jsonAdvert.responseText);
        if(advert.resultCode=="0"){
        	for(var i=0;i<6;i++){
        		$("#src"+(i+1)).attr("src",advert.advertPicList[i].url);
        		if(advert.advertPicList[i].associatedId!=0){
        		   $("#srch"+(i+1)).attr("href","gotoPicNews?advertId="+advert.advertPicList[i].id);
        		}
        	}
        }
        //var htmlobj=$.ajax({url:"getDirection",async:false});
        //var json=JSON.parse(htmlobj.responseText);
        //if(json.resultCode=="0"){
        //		for(var i=0;i<json.directionList.length;i++){
        //			var html="<img class='am-thumbnail margin-auto' src='"+json.directionList[i].directionUrl+"'/>"+json.directionList[i].directionName;
        //			$("#direct"+(i+1)).html(html);
        //		}
        //}
        
        var counselorList=$.ajax({url:"getCounseList?flag=1",async:false});
        var jsonCounselor=JSON.parse(counselorList.responseText);
        if(jsonCounselor.resultCode=="0"){
        		var html="";
        		var counseSize=5;
        		if(jsonCounselor.counselor.length<5){
        			counseSize=jsonCounselor.counselor.length;
        		}
        		for(var i=0;i<counseSize;i++){
        			html+="<li onclick='goCounselor("+jsonCounselor.counselor[i].counseTel+")' class='am-g am-list-item-desced am-list-item-thumbed am-list-item-thumb-left'>";
                        html+="<div  class='am-u-sm-3 am-list-thumb am-padding-left-sm'>";
                        html+="<a class=''>";
                        html+="<img class='img-65' src='"+jsonCounselor.counselor[i].personHead+"'/>";
                        html+="</a>";
                    html+="</div>";
                    html+="<div class=' am-u-sm-9 am-list-main'>";
                        html+="<h3 class='am-list-item-hd font-color-main'>";
                        if(jsonCounselor.counselor[i].recommenGrade.length==1){
                        	html+=" "+jsonCounselor.counselor[i].counseName+" <span style='float:right;margin-right:5%;color:#49B7B7'>推荐指数:0"+jsonCounselor.counselor[i].recommenGrade+"</span>";
                        }else{
                           html+=" "+jsonCounselor.counselor[i].counseName+" <span style='float:right;margin-right:5%;color:#49B7B7'>推荐指数:"+jsonCounselor.counselor[i].recommenGrade+"</span>";
                       	} 
                       html+=" </h3>";

                       html+=" <div class='font-12  font-color-11'>";
                         html+=""+jsonCounselor.counselor[i].professional;
                       html+=" </div>";
                       html+=" <div class='font-14  font-color-main'>";
                       html+=" 擅长方向： "+jsonCounselor.counselor[i].goodDirection;
                       html+=" </div>";
                    html+="</div>";
               html+=" </li>";
        		}
        		$(".am-list").html(html);
        }
    });
</script>
<script>
	function andmore(thiz){
		alert($(thiz).text());
		return false;
	}
	function moreCounselor(){
		var counselorList=$.ajax({url:"getCounseList?flag=1",async:false});
        var jsonCounselor=JSON.parse(counselorList.responseText);
        if(jsonCounselor.resultCode=="0"){
        		var html="";
        		for(var i=0;i<jsonCounselor.counselor.length;i++){
        			
        			html+="<li onclick='goCounselor("+jsonCounselor.counselor[i].counseTel+")' class='am-g am-list-item-desced am-list-item-thumbed am-list-item-thumb-left'>";
                        html+="<div class='am-u-sm-3 am-list-thumb am-padding-left-sm'>";
                        html+="<a class=''>";
                        html+="<img class='img-65' src='"+jsonCounselor.counselor[i].personHead+"'/>";
                        html+="</a>";
                    html+="</div>";
                    html+="<div class=' am-u-sm-9 am-list-main'>";
                        html+="<h3 class='am-list-item-hd font-color-main'>";
						if(jsonCounselor.counselor[i].recommenGrade.length==1){
                        	html+=" "+jsonCounselor.counselor[i].counseName+" <span style='float:right;margin-right:5%;color:#49B7B7'>推荐指数:0"+jsonCounselor.counselor[i].recommenGrade+"</span>";
                        }else{
                           html+=" "+jsonCounselor.counselor[i].counseName+" <span style='float:right;margin-right:5%;color:#49B7B7'>推荐指数:"+jsonCounselor.counselor[i].recommenGrade+"</span>";
                       	}                        html+=" </h3>";

                       html+=" <div class='font-12  font-color-11'>";
                            html+=""+jsonCounselor.counselor[i].professional;
                       html+=" </div>";
                       html+=" <div class='font-14  font-color-main'>";
                       html+=" 擅长方向： "+jsonCounselor.counselor[i].goodDirection;
                       html+=" </div>";
                    html+="</div>";
               html+=" </li>";
        		}
        		$(".am-list").html(html);
        		$("#seeMore").hide();
        }
	}
</script>
<div style="display:none">
<h3 id="menu-basic" style="display:none">基础接口</h3>    
<span class="desc"  style="display:none">判断当前客户端是否支持指定JS接口</span>    
<button class="btn btn_primary" id="checkJsApi"  style="display:none">checkJsApi</button>    
<h3 id="menu-share"  style="display:none">分享接口</h3>    
<span class="desc" >获取“分享到朋友圈”按钮点击状态及自定义分享内容接口</span>    
<button class="btn btn_primary" id="onMenuShareTimeline2" >onMenuShareTimeline</button>    
<span class="desc"  style="display:none">获取“分享给朋友”按钮点击状态及自定义分享内容接口</span>    
<button class="btn btn_primary" id="onMenuShareAppMessage"  style="display:none">onMenuShareAppMessage</button>    
<span class="desc"  style="display:none">获取“分享到QQ”按钮点击状态及自定义分享内容接口</span>    
<button class="btn btn_primary" id="onMenuShareQQ"  style="display:none">onMenuShareQQ</button>    
<span class="desc"  style="display:none">获取“分享到腾讯微博”按钮点击状态及自定义分享内容接口</span>    
<button class="btn btn_primary" id="onMenuShareWeibo"  style="display:none">onMenuShareWeibo</button>       
<h3 id="menu-voice">音频接口</h3>    
<span class="desc">开始录音接口</span>    
<button class="btn btn_primary" id="startRecord2">startRecord</button>    
<span class="desc">停止录音接口</span>    
<button class="btn btn_primary" id="stopRecord">stopRecord</button>    
<span class="desc">播放语音接口</span>    
<button class="btn btn_primary" id="playVoice">playVoice</button>    
<span class="desc">暂停播放接口</span>    
<button class="btn btn_primary" id="pauseVoice">pauseVoice</button>    
<span class="desc">停止播放接口</span>    
<button class="btn btn_primary" id="stopVoice">stopVoice</button>    
<span class="desc">上传语音接口</span>    
<button class="btn btn_primary" id="uploadVoice">uploadVoice</button>    
<span class="desc">下载语音接口</span>    
<button class="btn btn_primary" id="downloadVoice">downloadVoice</button>    
<h3 id="menu-smart">智能接口</h3>    
<span class="desc">识别音频并返回识别结果接口</span>    
<button class="btn btn_primary" id="translateVoice">translateVoice</button>    
</div>
<script src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>   
<script type="text/javascript">
wx.ready(function () {
// 1 判断当前版本是否支持指定 JS 接口，支持批量判断
document.querySelector('#checkJsApi').onclick = function () {
  wx.checkJsApi({
    jsApiList: [
      'getNetworkType',
      'previewImage'
    ],
    success: function (res) {
    }
  });
};
// 2. 分享接口
// 2.1 监听“分享给朋友”，按钮点击、自定义分享内容及分享结果接口
  wx.onMenuShareAppMessage({
	  title: title,
  desc: content,
	  link: window.location.href,
	  imgUrl: linkJpg,
    trigger: function (res) {
    },
    success: function (res) {
      myAlert('已分享');
    },
    cancel: function (res) {
      myAlert('已取消');
    },
    fail: function (res) {
    }
  });
// 2.2 监听“分享到朋友圈”按钮点击、自定义分享内容及分享结果接口
  wx.onMenuShareTimeline({
	  title: title,
  desc: content,
	  link: window.location.href,
	  imgUrl: linkJpg,
    trigger: function (res) {
    },
    success: function (res) {
      myAlert('已分享');
    },
    cancel: function (res) {
      myAlert('已取消');
    },
    fail: function (res) {
    }
  });
// 2.3 监听“分享到QQ”按钮点击、自定义分享内容及分享结果接口
  wx.onMenuShareQQ({
	  title: title,
  desc: content,
	  link: window.location.href,
	  imgUrl: linkJpg,
    trigger: function (res) {
    },
    complete: function (res) {
      myAlert(JSON.stringify(res));
    },
    success: function (res) {
      myAlert('已分享');
    },
    cancel: function (res) {
      myAlert('已取消');
    },
    fail: function (res) {
    }
  });
// 2.4 监听“分享到微博”按钮点击、自定义分享内容及分享结果接口
document.querySelector('#onMenuShareWeibo').onclick = function () {
  wx.onMenuShareWeibo({
	   title: title,
  desc: content,
	  link: '${ctx}/myzones.jsp',
	  imgUrl: linkJpg,
    trigger: function (res) {
      myAlert('用户点击分享到微博');
    },
    complete: function (res) {
      myAlert(JSON.stringify(res));
    },
    success: function (res) {
      myAlert('已分享');
    },
    cancel: function (res) {
      myAlert('已取消');
    },
    fail: function (res) {
      myAlert(JSON.stringify(res));
    }
  });
  myAlert('已注册获取“分享到微博”状态事件');
};
var shareData = {
  title: title,
  desc: content,
  link: window.location.href,
  imgUrl: linkJpg,
};
wx.onMenuShareAppMessage(shareData);
wx.onMenuShareTimeline(shareData);
});
wx.error(function (res) {
});

</script>
</body>
</html>